package leecode

func CheckPermutation(s1 string, s2 string) bool {
	hashMap := make(map[byte]int)
	for index, _ := range s1 {
		hashMap[s1[index]]++
	}
	for index, _ := range s2 {
		hashMap[s2[index]]--
	}
	for _, value := range hashMap {
		if value != 0 {
			return false
		}
	}
	return true
}
